package com.numberone.system.service.impl;

import com.numberone.common.support.Convert;
import com.numberone.system.domain.MarkertingTool;
import com.numberone.system.mapper.MarkertingToolMapper;
import com.numberone.system.service.IMarkertingToolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 营销工具 服务层实现
 * 
 * @author numberone
 * @date 2020-09-25
 */
@Service
public class MarkertingToolServiceImpl implements IMarkertingToolService
{
	@Autowired
	private MarkertingToolMapper markertingToolMapper;

	/**
     * 查询营销工具信息
     * 
     * @param id 营销工具ID
     * @return 营销工具信息
     */
    @Override
	public MarkertingTool selectMarkertingToolById(Long id)
	{
	    return markertingToolMapper.selectMarkertingToolById(id);
	}
	
	/**
     * 查询营销工具列表
     * 
     * @param markertingTool 营销工具信息
     * @return 营销工具集合
     */
	@Override
	public List<MarkertingTool> selectMarkertingToolList(MarkertingTool markertingTool)
	{
	    return markertingToolMapper.selectMarkertingToolList(markertingTool);
	}
	
    /**
     * 新增营销工具
     * 
     * @param markertingTool 营销工具信息
     * @return 结果
     */
	@Override
	public int insertMarkertingTool(MarkertingTool markertingTool)
	{
	    return markertingToolMapper.insertMarkertingTool(markertingTool);
	}
	
	/**
     * 修改营销工具
     * 
     * @param markertingTool 营销工具信息
     * @return 结果
     */
	@Override
	public int updateMarkertingTool(MarkertingTool markertingTool)
	{
	    return markertingToolMapper.updateMarkertingTool(markertingTool);
	}

	/**
     * 删除营销工具对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteMarkertingToolByIds(String ids)
	{
		return markertingToolMapper.deleteMarkertingToolByIds(Convert.toStrArray(ids));
	}
	
}
